// #include <gmock/gmock.h>
#include <gtest/gtest.h>

#include "task_scheduler/task_scheduler.h"

class TaskSchedulerTest : public ::testing::Test
{
  protected:
    void SetUp() override
    {
        // 初始化代码 (需要时)
    }
};

TEST_F(TaskSchedulerTest, BasicTest)
{
    Task task1(TaskPriority::Low, []() { std::cout << "priority Low, task1" << std::endl; });
    Task task2(TaskPriority::Medium, []() { std::cout << "priority Medium, task2" << std::endl; });
    Task task3(TaskPriority::High, []() { std::cout << "priority High, task3" << std::endl; });

    Scheduler scheduler;
    scheduler.addTask(std::move(task1));
    scheduler.addTask(std::move(task2));
    scheduler.addTask(std::move(task3));

    scheduler.executeAllTasks();
}

// class MockTask
// {
//   public:
//     MOCK_METHOD(void, execute, ());
// };

// TEST_F(TaskSchedulerTest, VerifyExecutionCount)
// {
//     MockTask mock1, mock2, mock3;

//     Scheduler scheduler;
//     scheduler.addTask(TaskPriority::High, [&]() { mock1.execute(); });
//     scheduler.addTask(TaskPriority::Medium, [&]() { mock2.execute(); });
//     scheduler.addTask(TaskPriority::Low, [&]() { mock3.execute(); });

//     // 设置预期调用顺序和次数
//     EXPECT_CALL(mock1, execute()).Times(1);
//     EXPECT_CALL(mock2, execute()).Times(1);
//     EXPECT_CALL(mock3, execute()).Times(1);

//     scheduler.executeAllTasks();
// }